<template>
  <div class="main" v-for="(item,index) in list" :key="index">
    <div>
      <input type="checkbox" v-model="item.complete"/>
      {{ item.title }}
      <button>删除</button>
    </div>
  </div>
</template>

<script>
import {defineComponent,ref,reactive,toRefs} from 'vue'
export default defineComponent({
  name:'NavMain',
  setup(props,ctx) {
    let list = ref([
      {
        title:'吃饭',
        complete:false
      },
      {
        title:'睡觉',
        complete:false
      },
      {
        title:'敲代码',
        complete:false
      },
    ]);
    return {
      list
    }
    
  }
});
</script>

<style lang="scss" scoped>
</style>
